<script>
  function obrazlozenjeChange(obr)
  {
     if(obr == 'slobodan unos')
     {
       $('#slobodno').removeClass('hide');
       $('#slobodno').focus();
     }
     else $('#slobodno').addClass('hide');
  }
</script>

<?php
  use_helper('jQuery', 'Form');
?>
<?php echo select_tag('predmet', options_for_select($predmets), array("class" => "gr_unos_predmeti", "onchange" => '$("#feedback").html("");'.jq_remote_function(array('form' => 'id=this.id', 'update' => 'dnevnik_container', 'url' => 'razred/grupniDnevnik?razred_id='.$sf_request->getParameter('razred_id'), 'loading'  => '$("#indicator").show()', 'complete' => '$("#indicator").hide()')))) ?>
<?php echo select_tag('obrazlozenje', options_for_select(OcenaPeer::$obrazlozenje), array("onchange" => "obrazlozenjeChange(this.value)")); ?>
<input type="text" name="slobodno" id="slobodno" class="hide" />

<div id="dnevnik_container">
</div>

<div id="feedback">
</div>